package ynu.edu.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import ynu.edu.entity.User;

@FeignClient("provider-service")
public interface ServiceProviderService {
    @GetMapping("/user/getUserById/{userId}")
    User GetUserById(@PathVariable("userId") Integer userId);

    @PostMapping("/user/create")
    User createUser(@RequestBody User newUser);


    @PutMapping("/user/update/{userId}")
    User updateUser(@PathVariable("userId") Integer userId, @RequestBody User updatedUser);

    @DeleteMapping("/user/delete/{userId}")
    String deleteUser(@PathVariable("userId") Integer userId);
}